import 'package:inmotion_pro/pages/others/common_enum/vehicle_light_type.dart';
import 'package:inmotion_pro/pages/models/vehicle_error_model.dart';
import 'package:inmotion_pro/pages/models/vehicle_function_button_model.dart';
import 'package:ble_helper_plugin/library.dart';
import 'package:get/get.dart';
import 'package:get/get_rx/get_rx.dart';
import 'package:get/get_rx/src/rx_types/rx_types.dart';
import '../../service/realtime_data_server/vehicle_realtime_data/vehicle_statistics_once.dart';

// 车辆页面状态
class VehicleState {
  // 锁车状态
  RxBool isLocked = false.obs;

  // 大灯状态
  Rx<VehicleLightType> lightType = VehicleLightType.off.obs;

  // 当前电量
  RxDouble currentBatteryLevel = 0.0.obs;

  // 当前剩余里程
  RxDouble currentRemainingMileage = 0.0.obs;

  // 总里程
  RxDouble totalMileage = 0.0.obs;

  // 蓝牙动作状态
  Rx<CustomBluetoothConnectState> bluetoothConnectState =
      CustomBluetoothConnectState.disconnected.obs;

  // 云盒信号登记
  RxnInt tboxSignalLevel = RxnInt(null);

  // 警告消息列表
  RxList<VehicleErrorModel> warningMsgList = <VehicleErrorModel>[].obs;

  // 车辆Flash最近的一次骑行记录
  Rx<VehicleStatisticsOnce?> flashLatestCyclingRecord =
      Rx<VehicleStatisticsOnce?>(null);

  // 获取当前页面滚动位置
  RxDouble currentScrollOffset = 0.0.obs;

  // 根据当前车型获取功能按钮列表
  RxList<VehicleFunctionButtonModel> getVehicleFunctionButtons =
      <VehicleFunctionButtonModel>[].obs;
}
